<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App\Models\BaseModel;
class Slideshow extends BaseModel
{
    public static function getList()
    {
        $where = ['is_show' => 1];

        $model = self::where($where);

        $model->where('status', 1);

        $data = $model->orderBy('order', 'ASC')->orderBy('id', 'ASC')->get();

        if ($data)
        {
            $data = $data->toArray();
        }

        $data = array_values($data);

        return $data;
        // return self::formatBody(['list' => $data]);
    }
}
